package com.jasonli.service.impl;

import com.jasonli.dao.OrderInfoDao;
import com.jasonli.domain.OrderInfo;
import com.jasonli.service.OrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderInfoServiceImpl implements OrderInfoService {

    @Autowired
    private OrderInfoDao orderInfoDao;

    public boolean save(OrderInfo orderInfo) {
        orderInfoDao.save(orderInfo);
        return true;
    }

    public List<OrderInfo> getByCid(Integer cid) {
        return orderInfoDao.getByPid(cid);
    }

    public List<OrderInfo> getAll() {
        return orderInfoDao.getAll();
    }
}
